#!/usr/bin/env python

import twitter, os.path, ConfigParser

class SocialNetwork:
    
    PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
    configfile = os.path.join(PROJECT_PATH, "pyews.conf")
    config = ConfigParser.ConfigParser()
    config.read(configfile)
    uname = config.get("twitter", "uname")
    secret = config.get("twitter", "secret")
    
    def UpdateStatus(self, status):
        api = twitter.Api(username = self.uname, password = self.secret)
        try:
            status = api.PostUpdate(status)
        except:
            pass
